#version 330 core

uniform mat4 u_mProj;
uniform mat4 u_mModel;

layout(location = 1) in vec3 a_Position;
layout(location = 2) in vec3 a_Normal;
layout(location = 4) in vec3 a_Tangent;
layout(location = 3) in vec2 a_TexCoord;


out vec3 v_Position;
out vec3 v_Normal;
out vec3 v_Tangent;
out vec3 v_Binormal;
out vec2 v_TexCoord;
out vec3 v_LocalPosition;








void main(void)
{
	v_LocalPosition = a_Position;
	v_TexCoord = a_TexCoord*10;
	v_Position = (u_mModel*vec4(a_Position, 1)).xyz;
	
	v_Normal = mat3(u_mModel)*a_Normal;
	v_Tangent = mat3(u_mModel)*a_Tangent;
	v_Binormal = cross(v_Normal, v_Tangent);
	gl_Position  = u_mProj*vec4(v_Position, 1);
}